<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>	
	<script src="<%=contextPath %>/js/validator.js"></script>
	<script language="javascript" src="<%=contextPath%>/js/func.js"type=""></script>
	<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="<%=contextPath%>/js/advanceSearch.js"></script>
   <link rel="stylesheet" href="<%=contextPath%>/ext3/resources/css/ext-all.css" type="text/css"   />
    <script src="<%=contextPath%>/ext3/adapter/ext/ext-base.js"></script>
    <script src="<%=contextPath%>/ext3/ext-all.js"></script>
	<link href="<%=contextPath%>/css/search_v3.css" rel="stylesheet" type="text/css" />
	<link href="<%=contextPath%>/css/common.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	Ext.onReady(function(){
		var tb = new Ext.Toolbar({
		    renderTo: Ext.get('tbar'),
		    items: ['',
		        {
		            text: '查询',
		             icon:"<%=contextPath%>/" + "images/query.gif",
		             hidden:${(btn_add_display==null)?"true":"false"},
		             handler:cmt
		        },
		        {
		            text: '起草',
		            icon:"<%=contextPath%>/" + "images/add.gif",
		            hidden:${(btn_add_display==null)?"true":"false"},
		            handler:add
		        },
		        {
		            text: '修改',
		            icon:"<%=contextPath%>/" + "images/editlink.gif",
		            hidden:${(btn_add_display==null)?"true":"false"},
		            handler:toDetail
		            
		        },
		        {
		            text: '提交',
		            icon:"<%=contextPath%>/" + "images/fasong.png",
		            hidden:${(btn_add_display==null)?"true":"false"},
		            handler:option
		        },
		        
		        {
		            text: '删除',
		            icon:"<%=contextPath%>/" + "images/guanbi.gif",
		            hidden:${(btn_add_display==null)?"true":"false"},
		            handler:deleteIt
		        }
		          
		    ]
		});
	});
	</script>
   <script>
   	  
			function add(){
				  newgzPlanFormWin.show();
				//window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id=0";
			}		
			// 新建修改进入详细页面
			function toDetail(){
				 if(!isChecked("id")){
						alert("请选择项目！");
						return false;
					}
					
					    //获得id
				   window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id="+checkedid;
			}
			// 查看详细页面
			function toInfo(id){
				   window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id="+id;
			}
				//人员评价
			function option(){
				if(!isChecked("id")){
					alert("请选择项目！");
					return false;
				}
				 getCheckValue("id");//获取id值
			 	if(confirm("确定要要将计划提交吗？")) {
				
				document.frmM.action = "<%=contextPath%>/plan!submit.do?state=1";
				document.frmM.submit();
				}
			}
					 
			// 查询
			function cmt() {
				document.frmM.action = "<%=contextPath%>/planList!getList.do?page=1&c=c";
				document.frmM.submit();
			}

			// 删除
			function deleteIt(){
				if(!isChecked("id")) {
		 			alert("请选择要删除的记录");
		 			return false;
		 		}
		    	if(confirm("确定要删除选中的记录吗？")) {
		        	document.frmM.action = "<%=contextPath%>/projectDeclaration!delete.do";
					document.frmM.submit();
		    	}
			}
			 var newgzPlanForm = new Ext.form.FormPanel({
				  frame:true,
				  autoHeight:true,	
				  width:600,
				  labelWidth:80,
				  items:[{
					  xtype:"fieldset",
					  title:"基本信息",
					  autoHeight:true,			//使自适应展开排版
					  items:[{
						    layout: 'form',
						    border:false,
						    items: [{
						    	 xtype:'textfield',
				                 fieldLabel: '责任班组',
				                 name: 'startdate',
				                 anchor:'95%'
			                   
			                },{
			                   
			                    xtype:'textfield',
					            fieldLabel: '责任人',
					            name: 'stationname',
					            anchor:'95%'
			                },{
			                    xtype:'textfield',
					            fieldLabel: '工作内容',
					            name: 'powerrange',
					            anchor:'95%'
			                },{
			                    xtype:'datefield',
					            fieldLabel: '完成时间',
					            name: 'powerrange',
					            anchor:'95%'
			                },{
			                    xtype:'textfield',
					            fieldLabel: '工时',
					            name: 'powerrange',
					            anchor:'95%'
			                },{
			                    xtype:'textfield',
					            fieldLabel: '备注',
					            name: 'powerrange',
					            anchor:'95%'
			                }]
				          }]
						  	
				}],
						 
				tbar:{
					 width: '100%',
					 items:[{
						pressed : true,
						text : '保存',
						icon:contextpath + '/images/save.gif',
					    handler:function(){
				    	 	
				     	}
					},'-',{
						pressed : true,
						text : '关闭',
						icon:contextpath + '/images/delete.gif',
					    handler:function(){
				    	 	
				     	}
					}]
			  }
					
			  });
			  var newgzPlanFormWin = new Ext.Window({
				  	title   : "管理工作计划",
		    		width:615,
		    		autoHeight:true,	
		    		closable   : true,
		    		modal   : true,
		    		buttonAlign : 'center',
		    		plain   : true,
		    		items:[newgzPlanForm]
			  });
	
	 
	</script>
	
  </head>
  
  <body>
 <body>
  <div id ='tbar'></div>
		<form id="frmM" class="ct" name="frmM" method="POST" action="<%=contextPath%>/queryUser.do">
			 <input type="hidden" name="searchBean.displayFlag" value="${searchBean.displayFlag}"/>
			 <input type="hidden" name="searchBean.con8" id="searchBean.con8" value="${searchBean.con8}" >
			<input type="hidden" name="conditionHtml" />
			<table width="100%" id="contab" >
				<tr>
					<th >责任班组</th >
					<td  align="left" >
					<input type="text"  onclick="WdatePicker({el:$dp.$('searchBean.con1')})" name="searchBean.con1" id="searchBean.con1" value=${searchBean.con1 }>
					</td>
					<th >责任人：</th >
					<td  align="left" >
					<input type="text"  onclick="WdatePicker({el:$dp.$('searchBean.con2')})"  name="searchBean.con2" id="searchBean.con2" value=${searchBean.con2 }>
					</td>
				</tr>
				<tr>
					<th >工作内容</th >
					<td  align="left">
					<input type="text" name="searchBean.con3" id="searchBean.con3" value="${searchBean.con3}" >
					</td>
					<th >完成时间：</th >
					<td  align="left" >
					  	<input type="text" name="searchBean.con3" id="searchBean.con3" value="${searchBean.con3}" >
						</td>
		</tr>
			</table>
		<hr>
		<table width="100%" id="listtab">
    		<tr>
    			<th width="10%">
	           <input name="chkAll" type="checkbox" id="chkAll"
				onclick="javascript:checkAll(this.form, 'id');" value="checkbox">全选
				</th>
				<th class="ct">责任班组</th>
				<th class="ct" >责任人</th>
				<th class="ct" >工作内容</th>
				<th class="ct" >完成时间</th>
				<th class="ct" >备注</th>
			 
				
			</tr>
						<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>班组0003
						  </td>
						<td>仲军 <td>维护变电设备</td>
						<td>2012-03-11</td>
						<td></td>
						 	</tr>
						 		<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>班组0004
						  </td>
						<td> 马赛<td>维护变电设备</td>
						<td>2012-03-11</td>
						<td></td>
						 	</tr>
						 		<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>班组0005
						  </td>
						<td>张国焘 <td>维护变电设备</td>
						<td>2012-03-11</td>
						<td></td>
						 	</tr>
						 		<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>班组0006
						  </td>
						<td> 黎明<td>维护变电设备</td>
						<td>2012-03-11</td>
						<td></td>
						 	</tr>
						 		<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>班组0007
						  </td>
						<td>马建 <td>维护</td>
						<td>2012-03-11</td>
						<td></td>
						 	</tr>

		</table>
			<table width="100%" id="tablestyle2">
			<tr>
				<td>
					<hr />
				</td>
			</tr>
			<tr>
				<td>${pageDown}</td>
			</tr>
		</table>
	</form>
  </body>
</html>
